package com.tulingxueyuan.mall.security.tulingtest.singlon;

/**
 * @author :     sunting
 * @date :    2023/6/5 11:21
 * @description :
 */
//懒汉式（线程安全）
public class singlon1 {
    private static singlon1 instance;
    public static synchronized  singlon1 getinstance(){
        if(instance ==null){
            instance = new singlon1();
        }
        return instance;
    }
}
